package com.springcloud.alibaba.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FlowEffectController {

    @RequestMapping("/warnup")
    public String testWarnUp(){
        try {
            Thread.sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "测试流控效果----热启动";
    }

    @RequestMapping("/ratelimit")
    public String testRateLimit(){
        try {
            Thread.sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "测试匀速排队效果";
    }
}
